<!--
 * @Author: 星孑
 * @Date: 2022-04-07 11:23:12
 * @LastEditors: 星孑
 * @LastEditTime: 2022-04-09 14:52:58
 * @FilePath: /admin/src/components/Table/components/TdHandle.vue
 * @Description: 表格链接组件
-->
<template>
  <span>
    <el-link
      v-if="text"
      type="primary"
      :underline="false"
      :disabled="col.disabled ? col.disabled() : false"
      @click="$emit('clickBtn', row, { name: col.name, prop: col.prop })"
    >
      {{ text }}
    </el-link>
    <span v-else type="text">--</span>
  </span>
</template>

<script>
export default {
  name: 'TdHandle',
  components: {},
  props: {
    col: {
      type: Object,
      default: () => {}
    },
    row: {
      type: Object,
      default: () => {}
    }
  },
  data() {
    return {

    }
  },
  computed: {
    text() {
      return this.row[this.col.prop]
    }
  },
  methods: {

  }
}
</script>

<style lang='scss' scoped>

</style>
